export default {
  many_to_many_question: {
    type: "object",
    properties: {
      id: {
        type: "integer",
        description: "问题ID",
      },
      title: {
        type: "string",
        description: "问题标题",
      },
      text: {
        type: "string",
        description: "问题内容",
      },
      categories: {
        type: "array",
        items: {
          $ref: "#/components/schemas/many_to_many_category",
        },
        description: "关联的分类对象数组",
      },
    },
    required: ["title", "text"],
  },
  many_to_many_category: {
    type: "object",
    properties: {
      id: {
        type: "integer",
        description: "分类ID",
      },
      name: {
        type: "string",
        description: "分类名称",
      },
    },
    required: ["name"],
  },
  many_to_many_createquestionrequest: {
    type: "object",
    properties: {
      title: {
        type: "string",
        description: "问题标题",
      },
      text: {
        type: "string",
        description: "问题内容",
      },
      categoryIds: {
        type: "array",
        items: {
          type: "integer",
          description: "分类ID",
        },
        description: "关联的分类ID数组",
      },
    },
    required: ["title", "text"],
  },
  many_to_many_updatequestionrequest: {
    type: "object",
    properties: {
      title: {
        type: "string",
        description: "问题标题",
      },
      text: {
        type: "string",
        description: "问题内容",
      },
      categoryIds: {
        type: "array",
        items: {
          type: "integer",
          description: "分类ID",
        },
        description: "关联的分类ID数组",
      },
    },
  },
  many_to_many_createcategoryrequest: {
    type: "object",
    properties: {
      name: {
        type: "string",
        description: "分类名称",
      },
      description: {
        type: "string",
        description: "分类描述",
      },
    },
    required: ["name"],
  },
};
